﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Back_end.Models
{
    public class Community
	{
		[Key]
		[HiddenInput(DisplayValue = false)]
		public string Id
		{ get; set; }

		[Required]
		[Display(Name = "标题")]
		public string Title
		{ get; set; }

		[Required]
		[Display(Name = "作者")]
		public string Author
		{ get; set; }

		[Display(Name = "发布日期")]
		[DataType(DataType.DateTime)]
		public DateTime PublishedTime
		{ get; set; }

		[Required]
		[DataType(DataType.Text)]
		[Display(Name = "内容")]
		public string Text
		{ get; set; }

		[Required]
		[Display(Name = "图片")]
		public string ImgPath
		{ get; set; }
	}
}